package com.example.hotelback.config;

import cn.hutool.core.util.StrUtil;
import com.example.hotelback.exception.CustomException;
import com.example.hotelback.utils.JwtUtils;
import io.jsonwebtoken.Claims;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;

/**
 * 拦截器定义
 */
public class LoginInterceptor implements HandlerInterceptor {

    /*
        request参数：前端发来的请求（如，客户端传来的cookie可以通过request拿到）
        response参数：返回前端的信息

     */
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println("拦截成功");
        return true;
    }
}
